{if $full_page}
<!-- $Id: user_account_list.htm 17030 2010-02-08 09:39:33Z sxc_shop $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<style>
.centers{
    position: absolute;
    z-index: 999;
    left: 0;
    width: 80%;
    left: 121px;
    height: auto;
    background: #fff;
    border: 1px solid #ccc;
}
</style>
<script type="text/javascript" src="../js/calendar.php"></script>
<script type="text/javascript" src="js/jPicker/jquery-1.4.4.min.js"></script> 
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="form-div">
  <form action="javascript:searchUser()" name="searchForm">
    <img src="images/icon_search.gif" width="25" height="22" border="0" alt="SEARCH" />
	时间
	 <span style="margin:10px 10px;"> 
      <input type="text" class="time" name="start_time" maxlength="60" size="20" readonly="readonly" id="start_time_id" />
      <input name="start_time_btn" type="button" id="start_time_btn" onclick="return showCalendar('start_time_id', '%Y-%m-%d', '24', false, 'start_time_btn');" value="{$lang.btn_select}" class="button"/>
      ~      
      <input type="text" class="time" name="end_time" maxlength="60" size="20" readonly="readonly" id="end_time_id" />
      <input name="end_time_btn" type="button" id="end_time_btn" onclick="return showCalendar('end_time_id', '%Y-%m-%d', '24', false, 'end_time_btn');" value="{$lang.btn_select}" class="button"/>
	 </span>
	
	 类型
	 <span>
	   <select name="type" id="types">
        <option value="0">请选择</option>
        <option value="1" {if $type eq '1'}selected="selected"{/if}>余额</option>
        <option value="2" {if $type eq '2'}selected="selected"{/if}>积分</option>
        <option value="3" {if $type eq '3'}selected="selected"{/if}>红包</option>
	    </select>
	 </span>
	 
	 
	 
      <input type="submit" value="{$lang.button_search}" class="button" />

  </form>

</div>


<form method="POST" action="" name="listForm">
<!-- start user_deposit list -->
<div class="list-div" id="listDiv">
{/if}

<!--{if $type eq '1'}-->

<table cellpadding="3" cellspacing="1">
  <tr>
    <th>客户编号</th>
    <th>客户姓名</th>
    <th>前值余额</th>
    <th>充值金额</th>
    <th>消费金额</th>
    <th>后值余额</th>
    <th>详细</th>
  </tr>
  
  {foreach from=$list item=item key=okey}
  <tr>
    <td align="center">{$item.user_id}</td>
    <td align="center">{$item.user_name}</td>
    <td align="center">{$item.q_money}</td>
    <td align="center">{$item.c_money}</td>
    <td align="center">{$item.t_money}</td>
    <td align="center">{$item.h_money}</td>
    <td align="center"><img src="images/icon_view.gif" width="21" height="21" border="0"  onmouseover="overs({$okey});" onmouseout="outs({$okey});"  />
	<div id="list_{$okey}" class="centers" style="display:none;">
	<table style="width:100%;text-align:center;">
		<tr>
			<td>编号</td>
			<td>金额</td>
			<td>类型</td>
			<td>时间</td>
		</tr>
	{foreach from=$item.list_money item=ite key=oky}	
	<tr>
		<td>{$ite.log_id}</td>
		<td>{$ite.user_money}</td>
		<td>
		{if $ite.change_type eq '0'}
		充值
		{else}
		消费
		{/if}
		</td>
		<td>{$ite.time}</td>
	</tr>
	{foreachelse}
	 <tr>
     <td class="no-records" colspan="4">{$lang.no_records}</td>
     </tr>
    {/foreach}
	
	
	</table>
	</div>
	</td>
  </tr>
  {foreachelse}
  <tr>
    <td class="no-records" colspan="8">{$lang.no_records}</td>
  </tr>
  {/foreach}

<table id="page-table" cellspacing="0">
<tr>

  <td><!-- 导出订单功能开始 this.form.target = '_blank'-->
	<span class="button Y-dele" onclick="exports();">导出订单</span>
	<!-- 导出订单功能结束 --></td>
  <td align="right" nowrap="true">

  {include file="page.htm"}
  </td>
</tr>
</table>



<!--{elseif $type eq '2'}-->


<table cellpadding="3" cellspacing="1">
  <tr>
    <th>客户编号</th>
    <th>客户姓名</th>
    <th>前值积分</th>
    <th>充值积分</th>
    <th>消费积分</th>
    <th>后值积分</th>
    <th>详细</th>
  </tr>
  
  {foreach from=$list item=item key=okey}
  <tr>
    <td align="center">{$item.user_id}</td>
    <td align="center">{$item.user_name}</td>
    <td align="center">{$item.q_money}</td>
    <td align="center">{$item.c_money}</td>
    <td align="center">{$item.t_money}</td>
    <td align="center">{$item.h_money}</td>
    <td align="center"><img src="images/icon_view.gif" width="21" height="21" border="0"  onmouseover="overs({$okey});" onmouseout="outs({$okey});"  />
	<div id="list_{$okey}" class="centers" style="display:none;">
	<table style="width:100%;text-align:center;">
		<tr>
			<td>编号</td>
			<td>积分</td>
			<td>类型</td>
			<td>描述</td>
			<td>时间</td>
		</tr>
	{foreach from=$item.list_money item=ite key=oky}	
	<tr>
		<td>{$ite.log_id}</td>
		<td>{$ite.pay_points}</td>
		<td>
		{if $ite.pay_points > 0}
		充值
		{else}
		消费
		{/if}
		</td>
		<td>{$ite.change_desc}</td>
		<td>{$ite.time}</td>
	</tr>
	{foreachelse}
	 <tr>
     <td class="no-records" colspan="4">{$lang.no_records}</td>
     </tr>
    {/foreach}
	
	
	</table>
	</div>
	</td>
  </tr>
  {foreachelse}
  <tr>
    <td class="no-records" colspan="8">{$lang.no_records}</td>
  </tr>
  {/foreach}

<table id="page-table" cellspacing="0">
<tr>

  <td><!-- 导出订单功能开始 this.form.target = '_blank'-->
	<span class="button Y-dele" onclick="exports();">导出订单</span>
	<!-- 导出订单功能结束 --></td>
  <td align="right" nowrap="true">

  {include file="page.htm"}
  </td>
</tr>
</table>


<!--{elseif $type eq '3'}-->

<table cellpadding="3" cellspacing="1">
  <tr>
    <th>客户编号</th>
    <th>客户姓名</th>
    <th>抵扣总金额</th>
    <th>详细</th>
  </tr>
  
  {foreach from=$list item=item key=okey}
  <tr>
    <td align="center">{$item.user_id}</td>
    <td align="center">{$item.user_name}</td>
    <td align="center">{$item.type_money}</td>
    <td align="center"><img src="images/icon_view.gif" width="21" height="21" border="0"  onmouseover="overs({$okey});" onmouseout="outs({$okey});"  />
	<div id="list_{$okey}" class="centers" style="display:none;">
	<table style="width:100%;text-align:center;">
		<tr>
			<td>编号</td>
			<td>订单号</td>
			<td>时间</td>
		</tr>
	{foreach from=$item.bonus_list item=ite key=oky}	
	<tr>
		<td>{$ite.bonus_id}</td>
		<td>订单号：{$ite.order_id}</td>
		<td>{$ite.time}</td>
	</tr>
	{foreachelse}
	 <tr>
     <td class="no-records" colspan="4">{$lang.no_records}</td>
     </tr>
    {/foreach}
	
	
	</table>
	</div>
	</td>
  </tr>
  {foreachelse}
  <tr>
    <td class="no-records" colspan="8">{$lang.no_records}</td>
  </tr>
  {/foreach}

<table id="page-table" cellspacing="0">
<tr>

  <td><!-- 导出订单功能开始 this.form.target = '_blank'-->
	<span class="button Y-dele" onclick="exports();">导出订单</span>
	<!-- 导出订单功能结束 --></td>
  <td align="right" nowrap="true">

  {include file="page.htm"}
  </td>
</tr>
</table>


<!--{/if}-->






{if $full_page}
</div>
  
<!-- end user_deposit list -->
</form>

<script type="text/javascript" language="JavaScript">
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};
{if $filter}
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{/if}


onload = function()
{
    // 开始检查订单
    startCheckOrder();
}
/**
 * 搜索用户
 */
function searchUser()
{

	var obj = document.getElementById("types"); //定位id
	var index = obj.selectedIndex; // 选中索引

    listTable.filter['type'] = obj.options[index].value;
	listTable.filter['start_time'] = document.forms['searchForm'].elements['start_time'].value;
	listTable.filter['end_time'] = document.forms['searchForm'].elements['end_time'].value;
	
    listTable.filter['page'] = 1;
    listTable.loadList();
}

/*20170628  YZ */
	function exports(){

		
		/*获取搜索框的值*/
		var start_time = document.forms['searchForm'].elements['start_time'].value;
		
		var end_time = document.forms['searchForm'].elements['end_time'].value;
		
		var type = document.forms['searchForm'].elements['type'].value;

	   /*链接组合*/
	   var urls = "export.php?act=point_query&start_time="+start_time+"&end_time="+end_time+"&type="+type;
	   
	   /*跳转链接*/
	   /*window.location.href = urls; */
	     window.open(urls);
	
	}

	
	
	/*鼠标移上移下*/
	function outs(obj){
	
	  document.getElementById('list_'+obj).style.display = "none";
	
	
	}
	
	
	
	/*鼠标移上移下*/
	function overs(obj){
	
	   document.getElementById('list_'+obj).style.display = "block";
	
	
	}
	
	
	
</script>
{include file="pagefooter.htm"}
{/if}